import { $Http } from '@/config/service/http';

export enum Api {
  // 档案迁移
  transferAudit = '/dms/archivesFileTransfer/audit', // 审核
  transferAutoProduct = '/dms/archivesFileTransfer/autoProductFormInfo', // 自动生成表单
  transferCloseFlow = '/dms/archivesFileTransfer/closeFlow', // 关闭流程
  transferConfirm = '/dms/archivesFileTransfer/confirmPosition', // 位置确认
  transferDelete = '/dms/archivesFileTransfer/delete', // 删除
  transferGet = '/dms/archivesFileTransfer/get', // 详情
  transferListBill = '/dms/archivesFileTransfer/listFromBillId', // 详情迁移文件信息
  transferListFrom = '/dms/archivesFileTransfer/listFromFilesBoxId', // 申请迁移文件信息
  transferPage = '/dms/archivesFileTransfer/page', // 分页查询
  transferReceive = '/dms/archivesFileTransfer/receive', // 接收
  transferRevoke = '/dms/archivesFileTransfer/revoke', // 撤回
  transferSave = '/dms/archivesFileTransfer/save' // 迁移申请
}

export const transferAudit = (params) => {
  return $Http.api(Api.transferAudit, params, 'post');
};

export const transferAutoProduct = (params) => {
  return $Http.api(Api.transferAutoProduct, params, 'post');
};

export const transferCloseFlow = (params) => {
  return $Http.api(Api.transferCloseFlow, params, 'post');
};

export const transferConfirm = (params) => {
  return $Http.api(Api.transferConfirm, params, 'post');
};

export const transferDelete = (params) => {
  return $Http.api(Api.transferDelete, params, 'post');
};

export const transferGet = (params) => {
  return $Http.api(Api.transferGet, params, 'get');
};

export const transferListBill = (params) => {
  return $Http.api(Api.transferListBill, params, 'post');
};

export const transferListFrom = (params) => {
  return $Http.api(Api.transferListFrom, params, 'post');
};

export const transferPage = (params) => {
  return $Http.api(Api.transferPage, params, 'post');
};

export const transferReceive = (params) => {
  return $Http.api(Api.transferReceive, params, 'post');
};

export const transferRevoke = (id) => {
  return $Http.api(`${Api.transferRevoke}/${id}`, null, 'get');
};

export const transferSave = (params) => {
  return $Http.api(Api.transferSave, params, 'post');
};
